home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "DEMONSTRATION"
- ClientHeight = 4425
- ClientLeft = 4140
- ClientTop = 1530
- ClientWidth = 7110
- Height = 4830
- Left = 4080
- LinkTopic = "Form1"
- ScaleHeight = 4425
- ScaleWidth = 7110
- Top = 1185
- Width = 7230
- Begin DirListBox Dir1
- Height = 1830
- Left = 4710
- TabIndex = 3
- Top = 1500
- Width = 2055
- End
- Begin ComboBox Combo1
- Height = 300
- Left = 4710
- TabIndex = 2
- Text = "Combo1"
- Top = 810
- Width = 2055
- End
- Begin PictureBox Picture1
- Height = 2835
- Left = 600
- Picture = DESSIN.FRX:0000
- ScaleHeight = 2805
- ScaleWidth = 3465
- TabIndex = 1
- Top = 540
- Width = 3495
- End
- Begin CommandButton Command1
- Caption = "Impression"
- Height = 345
- Left = 5130
- TabIndex = 0
- Top = 3900
- Width = 1815
- End
- ' '
- ' '
- 'Programme de d
- monstration de l'impression des fen
- tres sur une imprimante '
- ' '
- ' '
- DefInt A-Z
- Option Explicit
- Sub Command1_Click ()
- Dim R As Integer
- ' '
- ' '
- 'Routine permettant d'effectuer les impressions '
- ' '
- ' '
- 'Initialisation de l'imprimante '
- Printer.ScaleMode = 3
- Screen.MousePointer = 11
- Printer.Print ""
- 'Dessin de la fen
- tre enti
- re avec les contours '
- R = PrintWindow(Printer.hDC, 100, 100, Printer.ScaleWidth - 200, Printer.ScaleHeight - 200, Form1.hWnd)
- If Not R Then
- MsgBox "Unable to print the form"
- Exit Sub
- End If
- 'Dessin de la fen
- tre enti
- re sans les contours '
- R = PrintClient(Printer.hDC, 100, 2000, Form1.hWnd, 4)
- If Not R Then
- MsgBox "Unable to print the form"
- Exit Sub
- End If
- 'Dessin du dessin uniquement '
- R = PrintClient(Printer.hDC, 100, 1650, Picture1.hWnd, 2)
- If Not R Then
- MsgBox "Unable to print the form"
- Exit Sub
- End If
- 'Fin de l'impression '
- Printer.EndDoc
- Screen.MousePointer = 0
- End Sub
-